<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<#include "/views/ftl/base/manager_include.ftl">
<script type="text/javascript" src="${basePath}js/My97DatePicker/WdatePicker.js"></script>
<base href="${basePath}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户列表</title>
<script type="text/javascript">
function setEnable(id,enable){
	var msg="确定禁用"+id+"吗？";
	if(enable==1){
		msg = "确定恢复"+id+"吗？";
	}
   if(confirm(msg))
   {
    $.ajax({
		type : 'post',
		url:base+"manager/User_setEnable",
		dataType : "json",
		data : {userId:id,enable:enable},
		success : function(data) {
			if(data.code==1){
			    alert("操作成功！");
				window.location.href="${basePath}manager/User_userList";
			}
			if(data.code==0){
				alert(data.msg); 
			}
		}
	});
	}
}
</script>
</head>
<body style="background:#eef3f7;">
<#include "/views/ftl/base/head.ftl"> 
<div class="Main">
  <div class="dw">
<#include "/views/ftl/base/menu.ftl">
<#function a><#return "用户列表_List"></#function> 
<!--右边内容-->
<div class="Rightbox fl">
    <!--导航-->
    <div class="Bread_crbs clear">
      <div class="Bread_crbs_img fl"></div>
      <div class="Bread_crbs_text fl">
      	<a href="javascript:void(0);"><span>用户管理</span></a>
      	<span class="fnt_famy">></span>
      	<a href="javascript:void(0);"><span>用户详情</span></a>
      </div>
    </div>
      <div class="Table">
        </div>
  <!--表格列表-->
        <div class="Table">
        
         <div class="input_name">
            <span class="left_title">用户ID： </span>
            <span style="margin-left: 10px;">${(user.id?c)!''} </span>
          </div>
           <div class="input_name">
            <span class="left_title">用户名：</span><input type="text" style="width:210px" class="search_text tdd50" disabled="disabled" name="userName" id="a1" value="${(user.userName)!''}"> <span id="oa1" style="display:none;">${(user.userName)!''}</span>
          </div>
          <div class="input_name">
            	 <span class="left_title">钱包余额：</span> 
                 <span style="margin-left: 10px;">${(user.wallet)!''}</span>
           </div>
        	
          <!-- <div class="input_name">
            <span>头像：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> 
 			 <div class="" style="margin-left: 90px;" id="a16"> 
    	    <input name="image" id="image1" type="hidden" value="${(user.image)!''}" > 
        	<div id="divStatus" style="display:none;"></div>   
			   <input id="btnCancel1" type="button" value="Cancel All Uploads" onclick="swfu.cancelQueue();" style="display:none;margin-left: 2px; font-size: 8pt; height: 29px;" />
    		   <strong class="Bstyle AiYa" style="width: 115px;"></strong><a href="javascript:void(0);">
    		   <img id="image_img1" src=<#if user.image??><#if user.image==''>"${basePath }images/manager/up.jpg"</#if> <#if user.image!=''>${(user.image)!''}</#if></#if> height="100" width="100"></a>
               <span id="spanButtonPlaceHolder1"></span>
             </div>
               <span id="oa16"> <img src=${(user.image)!''}  height="100" width="100"></span>
          </div>
       <br><br><br><br> -->
       		
       	  
       	  <div class="input_name">
             <span class="left_title">身份认证：</span> 
             <select name="idAttest" class="St" style="display:none;"> 
	            	<option value='0' <#if (user.idAttest==0)>selected='true'</#if> >未认证</option>
	            	<option value='1' <#if (user.idAttest==1)>selected='true'</#if> >已认证</option>
	         </select>
             <span style="margin-left: 10px;" ><#if (user.idAttest==0)>未认证</#if><#if (user.idAttest==1)>已认证</#if></span>
          </div>
       	
          <div class="input_name">
            <span class="left_title">商户经营类型：</span>
             	<#if user.shopCompanyType?? >
                <select name="shopCompanyType" class="St" id="a15" style="display:none;">
                	<#list shopCompanyTypeEnum as enum >
	            		<option value='${enum.type}' <#if (user.shopCompanyType==enum.type)>selected='true'</#if> >${enum.description}</option>
	            	</#list> 
	            </select> 
	            <span style="margin-left: 10px;" ><#list shopCompanyTypeEnum as enum > <#if (user.shopCompanyType==enum.type)>${enum.description}</#if></#list></span>
                </#if> 
          </div>
           
          <div class="input_name">
             <span class="left_title">真实姓名(公司名)：</span>
			<!-- <input type="text" name="realName" class="search_text tdd50" value="${(user.realName)!''}" style="width:210px">-->
			 <span style="margin-left: 10px;">${(user.realName)!''}</span>
          </div>
           
          <div class="input_name">
            <span class="left_title">负责人：</span>
			<input type="text" name="legalPerson" class="search_text tdd50" value="${(user.legalPerson)!''}" style="width:210px;display:none;">
			<span style="margin-left: 10px;">${(user.legalPerson)!''}</span>
          </div> 
          
          <div class="input_name">
            <span class="left_title">电子邮箱：</span>
			<input type="text" name="email" class="search_text tdd50" value="${(user.email)!''}" style="width:210px">
			 <span style="display:none;">${(user.email)!''}</span>
          </div>
           
          <div class="input_name">
            <span class="left_title">QQ号：</span> 
 			<input type="text" name="qqNum" class="search_text tdd50" style="width:210px"  value="${(user.qqNum)!''}">
            <span style="display:none;">${(user.qqNum)!''}</span>
          </div>
          
          <div class="input_name">
             <span class="left_title">联系电话：</span>
             <input type="text" name="phoneNum" class="search_text tdd50" style="width:210px" value="${(user.phoneNum)!''}">
             <span style="display:none;">${(user.phoneNum)!''}</span>
          </div>
          
          <div class="input_name">
             <span class="left_title">联系地址：</span>
             <input type="text" name="address" class="search_text tdd50" style="width:210px" value="${(user.address)!''}">
             <span style="display:none;">${(user.address)!''}</span>
          </div>
          
          
         <div class="input_name">
            <span class="left_title">用户状态：</span>
             	<#if user.accountStatus?? >
                <select name="accountStatus" class="St">
                	<#list accountStatusTypeEnum as enum >  
	            		<option value='${enum.accountStatus}' <#if (user.accountStatus==enum.accountStatus)>selected='true'</#if> >${enum.description}</option>
	            	</#list> 
	            </select> 
                </#if>
          </div>
          
          <div class="input_name">
             <span class="left_title">云支付到期时间：</span>
             <input type="text" name="expirationTime" class="search_text tdd50" style="width:210px" value="${(user.expirationTime)!''}" readonly="readonly" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" >
             <span style="display:none;">${(user.expirationTime)!''}</span>
          </div>
          
          <div class="input_name">
             <span class="left_title">注册时间：</span>
             <input type="text" name="registTime" class="search_text tdd50" style="width:210px;display:none;" value="${(user.registTime)!''}">
             <span class="right_context" style="">${(user.registTime)!''}</span>
          </div> 
          
          <span class="tbl_btn" style="margin-left: 240px; background: #EEF3F7;"> 
             <a href="javascript:void(0);"><span id="save" style="background: #0075c5;">保存</span></a> 
             <a href="${basePath}manager/User_realNameVerify?userId=${(user.id)?c}" style="margin-left: 30px;">实名认证>></a>
          </span>
          
        </div> 
  
</div> 

<script> 
$(function(){
	
	$("#save").click(function(){
		var userId='${(user.id?c)!''}'; 
	
		var email = $("input[name=email]").val();
		var qqNum = $("input[name=qqNum]").val();
		var phoneNum = $("input[name=phoneNum]").val();
		var address = $("input[name=address]").val();
		var accountStatus = $("select[name=accountStatus]").val();
		var expirationTime = $("input[name=expirationTime]").val();
		
		 
		  
		$.ajax({ 
			url : "${basePath}manager/User_modifyUser",
			data : { 
				userId : userId, 
				email : email,
				qqNum : qqNum,
				phoneNum : phoneNum,
				address : address,
				accountStatus : accountStatus,
				expirationTime : expirationTime
			}, 
			dataType :"JSON",
			cache : false, 
			type : "POST",
			success : function(dat){
				if(dat.code==1){
					alert(dat.msg);
					location.reload();	 
				}else{
					alert(dat.msg);	
				} 
			}
		});
	});

});

</script>
</body>
</html>

